/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.park.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 安全管理人员信息
 *
 * @author pig
 * @date 2023-10-24 15:37:01
 */
@Data
@TableName("base_park_safe_manager")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "安全管理人员信息")
public class BaseParkSafeManagerEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 专(兼)职   1:专职  2:兼职
	*/
    @Schema(description="专(兼)职   1:专职  2:兼职")
    private String workType;

	/**
	* 人员类型
	*/
    @Schema(description="人员类型")
    private String managerType;

	/**
	* 姓名
	*/
    @Schema(description="姓名")

    private String managerName;

	/**
	* 手机号
	*/
    @Schema(description="手机号")
    private String managerMobile;

	/**
	* 身份证号
	*/
    @Schema(description="身份证号")
    private String managerIdNum;

	/**
	* 性别
	*/
    @Schema(description="性别")
    private String managerSex;

	/**
	* 职务
	*/
    @Schema(description="职务")
    private String managerDuty;

	/**
	* 职责
	*/
    @Schema(description="职责")
    private String managerDutyDetail;

	/**
	* 证书名称
	*/
    @Schema(description="证书名称")
    private String certificateName;

	/**
	* 证书编号
	*/
    @Schema(description="证书编号")
    private String certificateCode;

	/**
	* 发证单位
	*/
    @Schema(description="发证单位")
    private String publishUnit;

	/**
	* 有效日期
	*/
    @Schema(description="有效日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date effectiveDate;

	/**
	* 失效日期
	*/
    @Schema(description="失效日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date ineffectiveDate;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remark;

	/**
	* 附件
	*/
    @Schema(description="附件")
    private String attachment;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	public String getOrgIdStr() {
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company,this.orgId);
	}

	public String getWorkTypeStr(){
		return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.work_type,this.workType);
	}

	public String getManagerTypeStr(){
		return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.manager_type,this.managerType);
	}

	public String getManagerSexStr(){
		return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.gender,this.managerSex);
	}

}
